<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/jsplib/pubhead.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>${theForm.nick}的个人主页:i友邻社区</title>
	<link href="${cpath}/css/youlin.css" rel="stylesheet" type="text/css" media="all" />
	<!--[if IE 6]>
	  <script type="text/javascript" src="${cpath}/jspng/DD_belatedPNG_0.0.8a-min.js"></script>
	  <script type="text/javascript" src="${cpath}/jspng/ie6-png.js"></script>
	<![endif]-->
	<link  href="${cpath}/css/pop.css" rel="stylesheet" type="text/css">
</head>
<body>
<SCRIPT>
function change_width(img_name,wid,hei)
{
  var CurImage=new Image();
  if(CurImage.src!=img_name.src)
  {
  	CurImage.src=img_name.src;
  }
	var img_width = CurImage.width;
	var img_height = CurImage.height;
	img_name.width = img_width;
	img_name.height = img_height;

	if(img_height/hei > img_width/wid)
	{
		if( img_height > hei)
		{
			img_name.width = img_name.width/img_name.height*hei;
			img_name.height = hei;
		}
	}
	else
	{
		if( img_width > wid)
		{
			img_name.height = img_name.height/img_name.width*wid;
			img_name.width = wid;
		}
	}
	return true;
}
</SCRIPT>



<!--外套 start -->
<div class="wrap">
  <!--页首 start -->
	<%@ include file="/menuUser.jsp"%>
  <!--页首 end -->  
  <!--主体 start -->
 <div class="body theBody-prev">
   <div class="leftBar">
      <div class="thebox1">
       <h3>我的邻居</h3>
       <div class="content content-lg">
        <ul>
		<c:forEach var="linju" items="${linjulist}" varStatus="status"> 
        <li>
          <!--<p><a href="${cpath}/users_home/userID_${linju.linjuID}.html"><img class="user_icon_1" src="${cpath}/${myfn:getUserPic(linju.linjuID)}" width="51" height="51" title="${myfn:getUserNick(linju.linjuID)}"/></a></p>-->
          <p>
		  <a class="pic2" ><b></b><img src="${cpath}/${myfn:getUserPic(linju.linjuID)}" width="48" height="48" border="0"/></a>
		  </p>
		  <p>${myfn:getUserNick(linju.linjuID)}</p>
        </li>
		</c:forEach> 
        </ul>
       </div>
       <a class="more4" href="${cpath}/linju_list/qryUserID_${theForm.userID}.html">点击查看更多</a>
       </div>
      
       <div class="thebox1">
       <h3>我的部落</h3>
       <div class="content content-bl">
         <ul>
		  <c:forEach var="mygroup" items="${mygrouplist}" varStatus="status">
			 <li>
			 <a >${myfn:getGroupName(mygroup.groupID)}</a>
			 </li>
		  </c:forEach> 
         </ul> 
       </div>
      <a class="more4" href="${cpath}/gmember.do?action=mygrouplist&qryUserID=${theForm.userID}">点击查看更多</a>
      </div>
      <div class="thebox1">
        <h3>我的好友</h3>
       <div class="content content-lg">
        <ul>
		<c:forEach var="friend" items="${friendlist}" varStatus="status"> 
         <li>
          <p>
		  <a class="pic2" ><b></b><img src="${cpath}/${myfn:getUserPic(friend.friendID)}" width="48" height="48" border="0"/></a>
		  </p>
          <p>${myfn:getUserNick(friend.friendID)}</p>
         </li>
		</c:forEach> 
        </ul>
       </div>
       <a class="more4" href="${cpath}/friend_list/qryUserID_${theForm.userID}.html">点击查看更多</a>
      </div>

	<div class="thebox1">
       <h3>涂鸦墙</h3>
       <div class="content content-ly">
        <ul class="leaveWord-list1" style="width:205px;height:100px;OVERFLOW: hidden;">
		<c:forEach var="liuyan" items="${liuyanlist}" varStatus="status">  			
		<c:if test="${liuyan.follID == 0}">
          <p  id="ly${liuyan.seqID}" title="${liuyan.content}" style="line-height:22px;"><a href="${cpath}/users_home/userID_${liuyan.userID}.html" target="_blank">${myfn:getUserNick(liuyan.userID)}</a>:&nbsp;${fn:substring(liuyan.content,0,9)}&nbsp;[${myfn:formatMDHM(liuyan.mtime)}]</p>
		</c:if>
		<c:if test="${liuyan.follID != 0}">
          <p class="p3" title="${liuyan.content}" style="line-height:22px;">回复：<a href="${cpath}/users_home/userID_${liuyan.userID}.html" target="_blank">${myfn:getUserNick(liuyan.userID)}</a>: ${fn:substring(liuyan.content,0,9)}<span>${myfn:formatMDHM(liuyan.mtime)}</span></p>
		</c:if>
		</c:forEach>             
        </ul>   
		<form class="leaveWord2" action="${cpath}/notadv.do" name="form_liuyan"  method="post" enctype="multipart/form-data" >
			<p><textarea name="content" id="content" cols="" rows="" style="width:190px; height:60px;"></textarea></p>
			<p>
			<a href="javascript:lysubmit();" class="btn_r">保  存</a>
			</p>
			<!--隐藏域-->
			<input type="hidden" name='userID'		value='${userID}'/>
			<input type="hidden" name='ntype'		value='5'/>
			<input type="hidden" name='nsort'		value='5'/>
			<input type="hidden" name='nsortID'		value='${theForm.userID}'/>
			<input type="hidden" name='title'		value='${username}的留言'/>
			<input type="hidden" name='action'		value='add'/> 
		</form>
	    <div class="clearFloat"></div>
       </div>   
      </div>
      
   </div>
   
   <div class="mainBar">
     <div class="thebox4">
      <h3>个性签名</h3>
      <div class="content">      
       ${theForm.introduction}
      </div>
     </div>
     
     <div class="thebox5">
     <h3>个人资料</h3>
      <div class="content">
         <ul class="userInfoList1" >
		  <LI>性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别：${myfn:getMsg("SEX_TYPE",theForm.sex)} 
		  </LI>
		  <LI>家庭状况：${myfn:getMsg("FAMLIY_TYPE",theForm.famSts)} </LI>

		  <LI>生&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;肖：
		  <c:if test="${theForm.birthdaySet == '4' }"> 不公开</c:if>
		  <c:if test="${theForm.birthdaySet == '1' ||theForm.birthdaySet == '2' && isLinju == '1' || theForm.birthdaySet == '3' && isFriend == '1' }">${myfn:getMsg("SHXIAO_TYPE",theForm.chzodiac)}</c:if> 
		  </LI>
		  <LI>星&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;座：
		  <c:if test="${theForm.birthdaySet == '4' }"> 不公开</c:if>
		  <c:if test="${theForm.birthdaySet == '1' ||theForm.birthdaySet == '2' && isLinju == '1' || theForm.birthdaySet == '3' && isFriend == '1' }"> ${myfn:getMsg("STAR_TYPE",theForm.star)}</c:if>  
		  </LI>
		  <LI>籍&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;贯：
		  <c:if test="${theForm.home_Set == '4' }"> 不公开</c:if>
		  <c:if test="${theForm.home_Set == '1' ||theForm.home_Set == '2' && isLinju == '1' || theForm.home_Set == '3' && isFriend == '1' }">${myfn:getCnpcaName(theForm.home_location)}&nbsp;
		  ${myfn:getCnpcaName(theForm.home_sublocation)}</c:if>
		  </LI>
		  <LI>入住时间：${theForm.inTime}</LI>
         </ul> 
         <!-- <ul class="userInfoList2" >
		  <LI>个人爱好：
			 <c:if test="${theForm.interestSet == '1' ||theForm.interestSet == '2' && isLinju == '1' || theForm.interestSet == '3' && isFriend == '1' }"> 
				  <c:if test="${fn:indexOf(theForm.interest,'1,') > -1}">文学</c:if>&nbsp;
				  <c:if test="${fn:indexOf(theForm.interest,'2,') > -1}">艺术</c:if>&nbsp;
				  <c:if test="${fn:indexOf(theForm.interest,'3,') > -1}">运动</c:if>&nbsp;
				  <c:if test="${fn:indexOf(theForm.interest,'4,') > -1}">科技</c:if>&nbsp;
				  <c:if test="${fn:indexOf(theForm.interest,'5,') > -1}">娱乐</c:if>&nbsp;
				  <c:if test="${fn:indexOf(theForm.interest,'6,') > -1}">亲子</c:if>&nbsp;
				  <c:if test="${fn:indexOf(theForm.interest,'7,') > -1}">教育</c:if>&nbsp;
				  <c:if test="${fn:indexOf(theForm.interest,'8,') > -1}">公益</c:if>&nbsp;
				  <c:if test="${fn:indexOf(theForm.interest,'9,') > -1}">旅游</c:if>&nbsp;
				  <c:if test="${fn:indexOf(theForm.interest,'10,') > -1}">时尚</c:if>&nbsp;
				  <c:if test="${fn:indexOf(theForm.interest,'11,') > -1}">其他</c:if>&nbsp;  
			  </c:if>
			  <c:if test="${theForm.interestSet == '4' }"> 不公开</c:if>			
		  </LI>
         </ul> -->          
      </div>
     <a class="more6" href="javascript:openNewDiv('othInfo');">+更多</a>   
    </div>
     <div class="thebox5">
     <h3>我的相册</h3>
     <a class="more6" href="${cpath}/galbum.do?action=adlist&qryGroupID=99999999&qryUserID=${theForm.userID}">+更多</a>
      <div class="content">
        <ul class="theAlbumList4">
		  <c:forEach var="album" items="${albumlist}" varStatus="status">
            <li>
               <p class="p1"><A href="${cpath}/gpic.do?action=adlist&qryGAlbumID=${album.galbumID}" 
					target="_blank"><img src="${cpath}/${myfn:getAlbumHeadPic(album.galbumID)}" /></A></p>  
               <p class="p2">${album.albumname}</p>
            </li>
		  </c:forEach>
          </ul>
      </div>      
     </div> 
     
     <div class="thebox5">
     <h3>我的日志</h3>
     <a class="more6" href="${cpath}/blog.do?action=list&qryUserID=${theForm.userID}">+更多</a>
      <div class="content content-rz" style="margin-left:50px;">
		<ul class="noticeList" style="width:450px;">
		 <c:forEach var="blog" items="${bloglist}" varStatus="status">         
			<li><span class="s1" style="width:330px;"><a href="${cpath}/blog_info/qryBlogID_${blog.blogID}.html"  target="_blank">${fn:substring(blog.title,0,20)}</a></span>
			<span class="s2">${myfn:formatMDHM(blog.pubTime)}</span></li>
		  </c:forEach>
         </ul>
      </div>         
     </div>     
     
     <div class="thebox5">
     <h3>互动区</h3>
     <a class="more6" href="#">+更多</a>
      <div class="content content-hd">
		<form action="${cpath}/msg.do" name="form_msg"  method="post" enctype="multipart/form-data" class="leaveWord2" >	    <p><textarea name="msg"  id="msg" cols="" rows="" style="width:480px; height:130px;">&nbsp;</textarea></p>
			<p class="color_grey1">                  
			  <input name="radio1" type="radio" onClick="javascript:chgMtype(this);" value="1"/> 私聊 &nbsp;&nbsp;
			  <input name="radio1" type="radio" checked onClick="javascript:chgMtype(this);" value="2"/> 打招呼 &nbsp;&nbsp;
			  <c:if test="${theForm.villageID != cuIDvid && theForm.userID != userID }">
			  <input name="radio1" type="radio" onClick="javascript:chgMtype(this);" value="3" /> 加好友 &nbsp;&nbsp;
			  </c:if>
			  <c:if test="${theForm.villageID == cuIDvid && theForm.userID != userID }">
			  <input name="radio1" type="radio" onClick="javascript:chgMtype(this);" value="4" /> 加关注 &nbsp;&nbsp;
			  </c:if>
			  <input name="radio1" type="radio" onClick="javascript:chgMtype(this);" value="A" /> 验证申请 &nbsp;&nbsp;
			  <a href="javascript:msgsubmit();"><img src="${cpath}/images/icon_43.gif" /></a>
			  <c:if test="${theForm.villageID == cuIDvid && theForm.userID != userID }">
			  <!--<a href="javascript:guanzhu();"><img src="${cpath}/images/icon_44.gif" /></a>-->
			  </c:if>	
			</p>
			<!--隐藏域-->
			<input type="hidden" name='receiver'	value='${theForm.userID}'/>
			<input type="hidden" name='sender'		value='${userID}'/>
			<input type="hidden" name='sendertype'	value='1'/>
			<input type="hidden" name='mtype'		value='2'/>
			<input type="hidden" name='title'		value='${username}向你打招呼'/>
			<input type="hidden" name='action'		value='homesend'/>
		</form>   
		<div class="clearFloat"></div>
      </div>         
     </div>
   
   </div>
   
   <div class="clearFloat"></div>
 </div> 
 <!--主体 end -->
 
 
 <!--页脚 start -->
 <%@ include file="/foot.jsp"%>
 <!--页脚 end --> 
</div>
<!--外套 end -->
  
		<!-- 转发 弹出层 -->
		<DIV class=dragdiv id=othInfo style="DISPLAY:none ">
		<DIV class="otherdiv filterbox">
		<B class=g1></B><B class=g2></B><B class=g3></B><B class=g4></B>
		<DIV class="content filterbox"></DIV>
		<B class=g4></B><B class=g3></B><B class=g2></B><B class=g1></B></DIV>
		<DIV class=otherdivin>
		<H2><SPAN><A title=关闭 style="CURSOR: pointer" onclick="closeMask('othInfo')"><IMG src="${cpath}/icon/icon02.gif"></A></SPAN>会员其他资料： </H2>
		<DL >

		  <LI>真实姓名：${theForm.name} </LI>
		  <LI>年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;龄：
		  <c:if test="${theForm.birthdaySet == '4' }"> 不公开</c:if>
		  <c:if test="${theForm.birthdaySet == '1' ||theForm.birthdaySet == '2' && isLinju == '1' || theForm.birthdaySet == '3' && isFriend == '1' }"> ${myfn:formatdate8(theForm.birthday)}</c:if></LI>  
		  <LI>职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;业：
		  <c:if test="${theForm.workSet == '4' }"> 不公开</c:if>
		  <c:if test="${theForm.workSet == '1' ||theForm.workSet == '2' && isLinju == '1' || theForm.workSet == '3' && isFriend == '1' }">${theForm.work}</c:if></LI>
		  
		  <LI>居住状况：${myfn:getMsg("LIVE_TYPE",theForm.liveSts)} &nbsp;${myfn:getVillageName(theForm.villageID)}小区${theForm.building}栋${theForm.houseNo}楼 </LI>

		  <LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Email：${theForm.email} </LI>

			<LI>服&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;役：
			<c:if test="${theForm.armySet == '1' ||theForm.armySet == '2' && isLinju == '1' || theForm.armySet == '3' && isFriend == '1' }"> 
			<c:if test="${theForm.isArmy == '1' }"> ${myfn:getProperty("1",theForm.army)}</c:if>
			</c:if>
			<c:if test="${theForm.armySet == '4' }"> 不公开</c:if>			
			</LI>
			  <LI>毕业中学：	
			  <c:if test="${theForm.schoolSet == '4' }"> 不公开</c:if>
			  <c:if test="${theForm.schoolSet == '1' ||theForm.schoolSet == '2' && isLinju == '1' || theForm.schoolSet == '3' && isFriend == '1' }"> ${theForm.highSchool}</c:if>
			  <c:if test="${theForm.schoolSet == '4' }"> 毕业时间不公开</c:if>
			  <c:if test="${theForm.schoolSet == '1' ||theForm.schoolSet == '2' && isLinju == '1' || theForm.schoolSet == '3' && isFriend == '1' && theForm.hsFinshDate != ''}">&nbsp;&nbsp;毕业于${theForm.hsFinshDate}</c:if>
			   </LI>
			  <LI>毕业大学：	
			  <c:if test="${theForm.schoolSet == '4' }"> 不公开</c:if>
			  <c:if test="${theForm.schoolSet == '1' ||theForm.schoolSet == '2' && isLinju == '1' || theForm.schoolSet == '3' && isFriend == '1' }"> ${theForm.college}</c:if>
			  <c:if test="${theForm.schoolSet == '4' }"> 毕业时间不公开</c:if>
			  <c:if test="${theForm.schoolSet == '1' ||theForm.schoolSet == '2' && isLinju == '1' || theForm.schoolSet == '3' && isFriend == '1'&&  theForm.colFinshDate != ''}">&nbsp;&nbsp;毕业于${theForm.colFinshDate}</c:if>
			   </LI>
			<LI>特&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;长：
			${theForm.skill}</LI>
			</DL>
			<!--隐藏域-->
		</DIV></DIV><!-- 弹出层结束 -->
</body>
</html>
<SCRIPT type=text/javascript>

		//弹出提示层
		function openNewDiv(_id) 
		{
				var m = "mask";
				if(document.getElementById(m)) document.body.removeChild(document.getElementById(m));
				var newMask = document.createElement("div");
				newMask.id = m;
				newMask.style.position = "absolute";
				newMask.style.zIndex = "1";
				_scrollWidth = Math.max(document.body.scrollWidth,document.documentElement.scrollWidth);
				_scrollHeight = Math.max(document.body.scrollHeight,document.documentElement.scrollHeight);
				newMask.style.width = _scrollWidth + "px";
				newMask.style.height = _scrollHeight + "px";
				newMask.style.top = "0px";
				newMask.style.left = "0px";
				newMask.style.background = "#33393C";
				newMask.style.filter = "alpha(opacity=40)";
				newMask.style.opacity = "0.30";
				document.body.appendChild(newMask);
				showDiv = document.getElementById(_id);
				showDiv.style.display = "block";
				showDiv.style.position = "absolute";
				showDiv.style.zIndex = "9999";
				showDivWidth = 488;
				showDivHeight = 314;
				showDiv.style.top = (document.documentElement.scrollTop + document.documentElement.clientHeight/2 - showDivHeight/2) + "px";
				showDiv.style.left = (document.documentElement.scrollLeft + document.documentElement.clientWidth/2 -  showDivWidth/2) + "px";
		}
		function closeMask(_id)
		{
				var m = "mask";
				if(document.getElementById(m)) document.body.removeChild(document.getElementById(m));
				showDiv = document.getElementById(_id);
				showDiv.style.display = "none";
		}
	String.prototype.echo = function()
	{
		try
		{
			if(this == '')
			{
				throw 'empty';
			}
			else
			{
				alert(this);
			}
		}
		catch(err)
		{
			if(err == 'empty')
			{
				alert('this string is empty');
			}
		}
	}
	function is_login()
	{
		userID = '${userID}';
		if(userID == "")
			return false;
		return true;
	}

	function msgsubmit()
	{
		var form = document.form_msg;
		var sender = form['sender'];
		var receiver = form['receiver'];

		if(!is_login()||sender.value == '' ||receiver.value == ''){
			alert('请登陆网站');
			window.location.href ="${cpath}/user/login.jsp";
			return ;
		}
		if(document.getElementById('msg').value == ''){
			alert('内容不能为空');
			return ;
		}
		if(document.getElementById('msg').value.length > 2000){
			alert('内容超长');
			return ;
		}
		form.submit();
	}

	function disall(id2,id3)
	{	
		if(document.getElementById(id2).style.display == "none"){		
			document.getElementById(id2).style.display = "block";
			document.getElementById(id3).style.height = "auto";
		}else{
			document.getElementById(id2).style.display = "none";
			document.getElementById(id3).style.height = "233px";
		}
	}

	function chgMtype(mt)
	{
		var form = document.form_msg;
		var mtype = form['mtype'];
		var title = form['title'];
		var msg = form['msg'];
		var sendername = "${username}";

		if(mt.value == "1"){
			mtype.value = mt.value;
			title.value = sendername +"给你的私信";			
//			msg.value = "你好！我是" + sendername;
		}else if(mt.value == "2"){

			mtype.value = mt.value;
			title.value = sendername +"向你打招呼";	
//			msg.value = "你好！喜欢打球吗？" + sendername;
		}else if(mt.value == "3"){

			mtype.value = mt.value;
			title.value = sendername +"申请加你好友";			
//			msg.value = "你好！能成为好友吗？" + sendername;
		}else if(mt.value == "4"){

			mtype.value = mt.value;
			title.value = sendername +"申请加关注";			
//			msg.value = "你好！我们是邻居，互相关注，好吗？" + sendername;
		}else if(mt.value == "A"){

			mtype.value = mt.value;
			title.value = sendername +"申请验证";			
//			msg.value = "你好！申请验证，请帮忙！ " + sendername;
		}	
	}
/*
	function guanzhu()
	{
		var form = document.form_msg;
		var sender = form['sender'];
		var receiver = form['receiver'];

		if(!is_login()||sender.value == '' ||receiver.value == ''){
			alert('请登陆网站');
			window.location.href ="${cpath}/user/login.jsp";
			return false;
		}
		window.location.href ="${cpath}/linju.do?action=add&linjuID=" + receiver.value;		
	}	
*/
	function lysubmit()
	{
		var form = document.form_liuyan;
		var userID = form['userID'];

		if(userID.value == ''){
			alert('请登陆网站');
			window.location.href ="${cpath}/user/login.jsp";
			return false;
		}
		if(document.getElementById('content').value == ''){
			alert('内容不能为空');
			return false;
		}
		if(document.getElementById('content').value.length > 300){
			alert('内容超长');
			return false;
		}
		form.submit();
	}

	function zhaohu(id2,id3)
	{	
		if(document.getElementById(id2).style.display == "none"){		
			document.getElementById(id2).style.display = "block";
			if(document.getElementById(id3).style.display == "block"){		
				document.getElementById(id3).style.display = "none";
			}
		}else{
			document.getElementById(id2).style.display = "none";
		}
	}
</SCRIPT>
